package com.qs.eggs.view.ordermanager.adapter;

import android.content.Context;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

import com.facebook.drawee.view.SimpleDraweeView;
import com.google.gson.Gson;
import com.lzy.okgo.OkGo;
import com.lzy.okgo.callback.StringCallback;
import com.qs.eggs.Constants;
import com.qs.eggs.R;
import com.qs.eggs.adapter.BaseAdapter;
import com.qs.eggs.adapter.BaseViewHolder;
import com.qs.eggs.adapter.SimpleAdapter;
import com.qs.eggs.bean.CollectBean;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import okhttp3.Call;
import okhttp3.Response;

public class ItemOrderListAdapter extends SimpleAdapter<CollectBean> {
    List<CollectBean> datas=new ArrayList<>();
    private Context context;

    public ItemOrderListAdapter(Context context, List<CollectBean> datas) {
        super(context, R.layout.orderpic, datas);
        this.context = context;
        this.datas = datas;
    }

    @Override
    protected void convert(BaseViewHolder viewHoder, final CollectBean item, final int position) {
        SimpleDraweeView draweeView = (SimpleDraweeView) viewHoder.getView(R.id.propic);
        draweeView.setImageURI(Constants.URL_BASE+"productimages/"+item.getAutoname());

        viewHoder.getTextView(R.id.tv_content).setText(item.getProname());
        viewHoder.getTextView(R.id.tv_price).setText(item.getPrice());
        viewHoder.getTextView(R.id.tv_count).setText(item.getCount());

    }

}
